﻿package com.toncen.samepms.basic.action;

import com.toncen.samepms.basic.dao.NotificationDao;
import com.toncen.samepms.basic.domain.Notification;
import com.toncen.samepms.common.AbstractDatabaseAction;

/**
 * 描述：内部通知表BASIC_NOTIFICATION的action文件
 * 
 * @author tch
 * 
 */
public class NotificationAction extends AbstractDatabaseAction<Notification, NotificationDao> {
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1339573177870L;

	public NotificationAction() throws Exception {
		super();
	}

	/* (non-Javadoc)
	 * @see com.toncen.samepms.common.AbstractAction#prepareOnDoNew()
	 */
	@Override
	public void prepareOnDoNew() throws Exception {
		super.prepareOnDoNew();
		getDomain().setCreateUser(getCurrentUser());
		getDomain().setAnthor(getCurrentUser().getName());
	}

	/**
	 * 浏览
	 * 
	 * @return
	 * @throws Exception
	 */
	public String onDoBrowse() throws Exception {
		prepareOnDoView();
		setReadonly(true);
		return SUCCESS;
	}
}
